package com.yuexunit.operationman.nbsy.module.Login.model.impl;



import com.yuexunit.operationman.nbsy.Api.Api;
import com.yuexunit.operationman.nbsy.module.Login.bean.UpdateBean;
import com.yuexunit.operationman.nbsy.module.Login.model.IUpdateModel;
import com.yuexunit.operationman.nbsy.util.ApiUtil;

import rx.Observable;

/**
 * Created by work-jx on 2016/9/20.
 */
public class UpdateModel implements IUpdateModel {
    private Api api;

    public Api ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi_Update(Api.class);
        }
    }

    @Override
    public Observable<UpdateBean> update() {
        api = ApiInstance();
        return api.update();
    }
}
